package 力扣日常刷题.木22二月.第21天227;

/**
 * @author 帅小伙
 * @date 2022/2/27
 * @description
 */
public class Demo171 {
    public int minSteps(String s, String t) {
        int[] a = new int[26];
        int[] b = new int[26];
        for (char c : s.toCharArray()) a[c-'a']++;
        for (char c : t.toCharArray()) b[c-'a']++;
        int ans = 0;
        for (int i = 0; i < 26; i++) {
            ans += Math.abs(a[i] - b[i]);
        }
        return ans;
    }
}
